﻿@{
    ViewBag.Title = "Gán chỉ tiêu cho các đơn vị";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
    List<SelectListItem> allyear = new List<SelectListItem>();
    int year = DateTime.Now.Year;
    for (int i = year + 1; i >= 2010; i--)
    {
        allyear.Add(new SelectListItem
        {
            Value = i.ToString(),
            Text = i.ToString()
        });

    }


}
<style>
    table {
        table-layout: fixed;
        word-wrap: break-word;
        font-size: small;
        text-align: center;
    }

    .e-input1 {
        background-color: #fae8e8;
        border: 1px solid #fb8989;
        text-align: left;
        border-radius: 3px;
        padding: 5px;
        height: 26px;
        font-family: "Open Sans", arial !important;
        box-shadow: 0 1px 1px rgba(50,50,50,0.1);
    }

    .e-input2 {
        border: 1px solid #8dc1e1;
        background: #bee6ff;
        text-align: left;
        border-radius: 3px;
        padding: 5px;
        height: 26px;
        font-family: "Open Sans", arial !important;
        box-shadow: 0 1px 1px rgba(50,50,50,0.1);
    }
</style>
<style>
    legend a {
        color: inherit;
    }

    legend.legendStyle {
        padding-left: 5px;
        padding-right: 5px;
    }

    fieldset.fsStyle {
        font-family: Verdana, Arial, sans-serif;
        font-size: small;
        font-weight: normal;
        border: 1px solid #999999;
        padding: 4px;
        margin: 5px;
    }

    legend.legendStyle {
        font-size: 90%;
        color: #888888;
        background-color: transparent;
        font-weight: bold;
    }

    legend {
        width: auto;
        border-bottom: 0px;
    }
</style>
<script>
    @functions{
           public string GetAntiForgeryToken()
           {
               string cookieToken, formToken;
               AntiForgery.GetTokens(null, out cookieToken, out formToken);
               return cookieToken + "," + formToken;
           }
       }
</script>
<link href="~/Content/standard_form_nhaplieu.css" rel="stylesheet" />
<link href="@Url.Content("~/Content/jquery-ui.1.10.2.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery.maskedinput.js")"></script>
@Html.AntiForgeryToken()
<div class="page-bar">
    <ul class="page-breadcrumb" style="padding: 4px;">
        <li>
            <i class="fa fa-home"></i>
            <a href="#">@ViewBag.CurrentMenuName</a>
        </li>
    </ul>
</div>
<div class="row margin-bottom-20">
    <div class="col-md-5">
        <div class="row" style="margin-top:5px;">
            @Html.Label("Chọn năm kế hoạch", new { @class = "col-md-5", id = "lb1" })
            <div class="col-md-7">
                @Html.DropDownList("Namkehoach", allyear, new { id = "Namkehoach", style = "margin:0px;", @class = "form-control input-sm" })
            </div>
        </div>
    </div>
</div>
<div>
    <fieldset class="fsStyle">
        <legend class="legendStyle">
            <a data-toggle="collapse" data-target="#demo" href="#">Chọn chỉ tiêu cho đơn vị</a>
        </legend>
        <div class="row">
            <div class="col-md-6">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">Danh sách đơn vị</h3>
                    </div>
                    <div class="dv-body">
                        <div class="form-group">
                            <select multiple class="form-control" id="donvi" style="height: 400px; max-height: 400px; overflow-x: auto;">
                                
                            </select>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-6">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">Danh sách các chỉ tiêu năm <label class="nam"></label></h3>
                    </div>
                    <div class="panel-body" style="max-height:400px; overflow-x:auto;">
                        <div class="row">
                            <input type="checkbox" id="checkall" /> Chọn tất cả
                        </div>
                        <br />
                        <div class="row">
                            <div class="ct">

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        
    </fieldset>
</div>
<div class="modal-footer">
    <button type="button" id="Ghinhan" data-dismiss="modal" class="btn btn-primary">Ghi nhận</button>
    <button type="button" data-dismiss="modal" class="btn btn-primary">Export</button>
    <button type="button" class="btn btn-default" data-dismiss="modal">Hủy bỏ</button>
</div>
<script src="@Url.Content("~/Scripts/DHQG/GanchitieuDonvi.js")" type="text/javascript"></script>
<script>
    $(function () {
        var initData = {
            VerificationToken: "@GetAntiForgeryToken()",
            GetallChitieu: "@Url.Action("GetallChitieu","Kehoachnam")",
            SaveNamChitieu: "@Url.Action("SaveNamChitieu", "Kehoachnam")",
            GetallNamkehoach: "@Url.Action("GetallNamkehoach", "Kehoachnam")",
            GetallChitieubynamchitieu: "@Url.Action("GetallChitieubynamchitieu", "Kehoachnam")",
            GetDonViByNhom: "@Url.Action("GetDonViByNhom", "Kehoachnam")",
            SaveDonViChiTieu: "@Url.Action("SaveDonViChiTieu", "Kehoachnam")",
            GetKehoachbyNamkehoach: "@Url.Action("GetKehoachbyNamkehoach", "Kehoachnam")",
            GetAllDvCtbyNKH: "@Url.Action("GetAllDvCtbyNKH", "Kehoachnam")",
            Getdvctbydv: "@Url.Action("Getdvctbydv", "Kehoachnam")",
            DeleteKehoachbyDVCT:"@Url.Action("DeleteKehoachbyDVCT", "Kehoachnam")"
        };
        GanchitieuDonvi.init(initData);
    });
</script>